import java.util.Scanner;

public class Haniota {
    public static void hanniota(int n,char post1, char post2, char post3){
        if(n == 1) {
            move(post1,post3);
            return;
        }
        hanniota(n-1,post1,post3,post2);
        move(post1,post3);
        hanniota(n-1,post2,post1,post3);
    }
    public static void move(char post1, char post2){
        System.out.print("post1"+"->"+"post2"+" ");
    }
    public static void main(String[] args) {
        hanniota(1,'A','B','C');
        System.out.println();
        hanniota(2,'A','B','C');
        System.out.println();
        hanniota(3,'A','B','C');
    }
}
